package cool.mtc.minghe.data.model.sys.menu.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 明河
 */
@Data
public class MenuListDTO implements MenuTreeSupport {

    private Long menuId;
    private Long menuParentId;
    private String name;
    @JsonProperty(value = "key")
    private String code;
    private String icon;
    @JsonIgnore
    private int level;
    private int orderIndex;
    private boolean link;
    private String url;
    private String permission;
    private boolean display;
    private boolean enabled;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<MenuListDTO> children = new ArrayList<>();
}
